package com.commution.hit.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;
import us.codecraft.webmagic.pipeline.Pipeline;

import com.commution.hit.dao.PipelineDAO;
import com.commution.hit.domain.basic.DouBanMovie;

public class DouBanMoviePipeline implements Pipeline {
	
	private PipelineDAO pipelineDAO ;
	@Override
	public void process(ResultItems resultItems, Task task) {
		
		DouBanMovie dbm=(DouBanMovie)resultItems.get("DouBanMovie");

		pipelineDAO.insert(dbm);
		

	}
	public PipelineDAO getPipelineDAO() {
		return pipelineDAO;
	}
	public void setPipelineDAO(PipelineDAO pipelineDAO) {
		this.pipelineDAO = pipelineDAO;
	}
	
	
}
